package ooday03;

public abstract class Animal {
    String name;
    int age;
    String color;
    Animal(String name,int age,String color){
        this.name = name;
        this.age = age;
        this.color = color;
    }
    void drink(){
        System.out.println("我家的宠物叫"+name+"，今年"+age+"岁了，它是"+color+"色的，"+"它现在正在喝水");
    }
    abstract void eat();//抽象方法eat，可以统一派生类里的eat方法名，方法体里随意写
}

